package net.zoneland.knowledge.enums;

/**
 * 创建时间：2016-3-24 下午2:23:40 项目名称：aitalk-common-util
 * 类说明： 问句类别
 * @author ZY
 * @version 1.0
 * @since JDK 1.6.0_21 文件名称：QueStyleEnum.java
 */
public enum QueryTypeEnum {

    SEARCH("search", "手工输入问答"),
    QUERY_BY_PATH("queryByPath", "按level层级查找"),
    QUERY_BY_ID("queryById", "场景问答");

    private final String value;
    private final String name;

    QueryTypeEnum(String value, String name) {
        this.name = name;
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(String value) {
        for (QueryTypeEnum account : QueryTypeEnum.values()) {
            if (account.getValue().equalsIgnoreCase(value)) {
                return account.getName();
            }
        }
        return "";
    }
}
